package com.zb.frame.base.upgrade;

import com.zb.frame.base.upgrade.enums.ValueType;

public class UpgradeColumn {

    private final String name;
    private final String comment;
    private ValueType type;
    private boolean nullable;
    private Integer length;

    public UpgradeColumn(String name, String comment, ValueType type) {
        this.name = name;
        this.comment = comment;
        this.type = type;
        this.nullable = true;
    }

    public UpgradeColumn(String name, String comment, ValueType type, boolean nullable) {
        this.name = name;
        this.comment = comment;
        this.type = type;
        this.nullable = nullable;
    }

    public UpgradeColumn(String name, String comment, ValueType type, boolean nullable, Integer length) {
        this.name = name;
        this.comment = comment;
        this.type = type;
        this.nullable = nullable;
        this.length = length;
    }


    public String getName() {
        return this.name;
    }

    public String getComment() {
        return this.comment;
    }

    public ValueType getType() {
        return type;
    }

    public void setType(ValueType type) {
        this.type = type;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

}
